//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension DataPipeline {
    // MARK: Enums

    public enum OperatorType: String, CustomStringConvertible, Codable, _SotoSendable {
        case between = "BETWEEN"
        case eq = "EQ"
        case ge = "GE"
        case le = "LE"
        case refEq = "REF_EQ"
        public var description: String { return self.rawValue }
    }

    public enum TaskStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case failed = "FAILED"
        case `false` = "FALSE"
        case finished = "FINISHED"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct ActivatePipelineInput: AWSEncodableShape {
        /// A list of parameter values to pass to the pipeline at activation.
        public let parameterValues: [ParameterValue]?
        /// The ID of the pipeline.
        public let pipelineId: String
        /// The date and time to resume the pipeline. By default, the pipeline resumes from the last completed execution.
        public let startTimestamp: Date?

        public init(parameterValues: [ParameterValue]? = nil, pipelineId: String, startTimestamp: Date? = nil) {
            self.parameterValues = parameterValues
            self.pipelineId = pipelineId
            self.startTimestamp = startTimestamp
        }

        public func validate(name: String) throws {
            try self.parameterValues?.forEach {
                try $0.validate(name: "\(name).parameterValues[]")
            }
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, max: 1024)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, min: 1)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case parameterValues
            case pipelineId
            case startTimestamp
        }
    }

    public struct ActivatePipelineOutput: AWSDecodableShape {
        public init() {}
    }

    public struct AddTagsInput: AWSEncodableShape {
        /// The ID of the pipeline.
        public let pipelineId: String
        /// The tags to add, as key/value pairs.
        public let tags: [Tag]

        public init(pipelineId: String, tags: [Tag]) {
            self.pipelineId = pipelineId
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, max: 1024)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, min: 1)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 10)
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineId
            case tags
        }
    }

    public struct AddTagsOutput: AWSDecodableShape {
        public init() {}
    }

    public struct CreatePipelineInput: AWSEncodableShape {
        /// The description for the pipeline.
        public let description: String?
        /// The name for the pipeline. You can use the same name for multiple pipelines associated with your AWS account,  because AWS Data Pipeline assigns each pipeline a unique pipeline identifier.
        public let name: String
        /// A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines.  For more information, see Controlling User Access to Pipelines  in the AWS Data Pipeline Developer Guide.
        public let tags: [Tag]?
        /// A unique identifier. This identifier is not the same as the pipeline identifier assigned by AWS Data Pipeline.  You are responsible for defining the format and ensuring the uniqueness of this identifier. You use this  parameter to ensure idempotency during repeated calls to CreatePipeline. For example, if the  first call to CreatePipeline does not succeed, you can pass in the same unique identifier and  pipeline name combination on a subsequent call to CreatePipeline. CreatePipeline  ensures that if a pipeline already exists with the same name and unique identifier, a new pipeline is not  created. Instead, you'll receive the pipeline identifier from the previous attempt. The uniqueness of the  name and unique identifier combination is scoped to the AWS account or IAM user credentials.
        public let uniqueId: String

        public init(description: String? = nil, name: String, tags: [Tag]? = nil, uniqueId: String) {
            self.description = description
            self.name = name
            self.tags = tags
            self.uniqueId = uniqueId
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.validate(self.name, name: "name", parent: name, max: 1024)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 10)
            try self.validate(self.uniqueId, name: "uniqueId", parent: name, max: 1024)
            try self.validate(self.uniqueId, name: "uniqueId", parent: name, min: 1)
            try self.validate(self.uniqueId, name: "uniqueId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case name
            case tags
            case uniqueId
        }
    }

    public struct CreatePipelineOutput: AWSDecodableShape {
        /// The ID that AWS Data Pipeline assigns the newly created pipeline. For example, df-06372391ZG65EXAMPLE.
        public let pipelineId: String

        public init(pipelineId: String) {
            self.pipelineId = pipelineId
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineId
        }
    }

    public struct DeactivatePipelineInput: AWSEncodableShape {
        /// Indicates whether to cancel any running objects. The default is true,  which sets the state of any running objects to CANCELED. If this value is false, the pipeline is deactivated after all  running objects finish.
        public let cancelActive: Bool?
        /// The ID of the pipeline.
        public let pipelineId: String

        public init(cancelActive: Bool? = nil, pipelineId: String) {
            self.cancelActive = cancelActive
            self.pipelineId = pipelineId
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, max: 1024)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, min: 1)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case cancelActive
            case pipelineId
        }
    }

    public struct DeactivatePipelineOutput: AWSDecodableShape {
        public init() {}
    }

    public struct DeletePipelineInput: AWSEncodableShape {
        /// The ID of the pipeline.
        public let pipelineId: String

        public init(pipelineId: String) {
            self.pipelineId = pipelineId
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, max: 1024)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, min: 1)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineId
        }
    }

    public struct DescribeObjectsInput: AWSEncodableShape {
        /// Indicates whether any expressions in the object should be evaluated when the object descriptions are returned.
        public let evaluateExpressions: Bool?
        /// The starting point for the results to be returned. For the first call, this value should be empty.  As long as there are more results, continue to call DescribeObjects with the marker value from the previous call to retrieve the next set of results.
        public let marker: String?
        /// The IDs of the pipeline objects that contain the definitions to be described. You can pass as many as 25 identifiers in a single call to DescribeObjects.
        public let objectIds: [String]
        /// The ID of the pipeline that contains the object definitions.
        public let pipelineId: String

        public init(evaluateExpressions: Bool? = nil, marker: String? = nil, objectIds: [String], pipelineId: String) {
            self.evaluateExpressions = evaluateExpressions
            self.marker = marker
            self.objectIds = objectIds
            self.pipelineId = pipelineId
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.objectIds.forEach {
                try validate($0, name: "objectIds[]", parent: name, max: 1024)
                try validate($0, name: "objectIds[]", parent: name, min: 1)
                try validate($0, name: "objectIds[]", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            }
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, max: 1024)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, min: 1)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case evaluateExpressions
            case marker
            case objectIds
            case pipelineId
        }
    }

    public struct DescribeObjectsOutput: AWSDecodableShape {
        /// Indicates whether there are more results to return.
        public let hasMoreResults: Bool?
        /// The starting point for the next page of results. To view the next page of results, call DescribeObjects  again with this marker value. If the value is null, there are no more results.
        public let marker: String?
        /// An array of object definitions.
        public let pipelineObjects: [PipelineObject]

        public init(hasMoreResults: Bool? = nil, marker: String? = nil, pipelineObjects: [PipelineObject]) {
            self.hasMoreResults = hasMoreResults
            self.marker = marker
            self.pipelineObjects = pipelineObjects
        }

        private enum CodingKeys: String, CodingKey {
            case hasMoreResults
            case marker
            case pipelineObjects
        }
    }

    public struct DescribePipelinesInput: AWSEncodableShape {
        /// The IDs of the pipelines to describe. You can pass as many as 25 identifiers in a single call.  To obtain pipeline IDs, call ListPipelines.
        public let pipelineIds: [String]

        public init(pipelineIds: [String]) {
            self.pipelineIds = pipelineIds
        }

        public func validate(name: String) throws {
            try self.pipelineIds.forEach {
                try validate($0, name: "pipelineIds[]", parent: name, max: 1024)
                try validate($0, name: "pipelineIds[]", parent: name, min: 1)
                try validate($0, name: "pipelineIds[]", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineIds
        }
    }

    public struct DescribePipelinesOutput: AWSDecodableShape {
        /// An array of descriptions for the specified pipelines.
        public let pipelineDescriptionList: [PipelineDescription]

        public init(pipelineDescriptionList: [PipelineDescription]) {
            self.pipelineDescriptionList = pipelineDescriptionList
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineDescriptionList
        }
    }

    public struct EvaluateExpressionInput: AWSEncodableShape {
        /// The expression to evaluate.
        public let expression: String
        /// The ID of the object.
        public let objectId: String
        /// The ID of the pipeline.
        public let pipelineId: String

        public init(expression: String, objectId: String, pipelineId: String) {
            self.expression = expression
            self.objectId = objectId
            self.pipelineId = pipelineId
        }

        public func validate(name: String) throws {
            try self.validate(self.expression, name: "expression", parent: name, max: 20_971_520)
            try self.validate(self.expression, name: "expression", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.validate(self.objectId, name: "objectId", parent: name, max: 1024)
            try self.validate(self.objectId, name: "objectId", parent: name, min: 1)
            try self.validate(self.objectId, name: "objectId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, max: 1024)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, min: 1)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case expression
            case objectId
            case pipelineId
        }
    }

    public struct EvaluateExpressionOutput: AWSDecodableShape {
        /// The evaluated expression.
        public let evaluatedExpression: String

        public init(evaluatedExpression: String) {
            self.evaluatedExpression = evaluatedExpression
        }

        private enum CodingKeys: String, CodingKey {
            case evaluatedExpression
        }
    }

    public struct Field: AWSEncodableShape & AWSDecodableShape {
        /// The field identifier.
        public let key: String
        /// The field value, expressed as the identifier of another object.
        public let refValue: String?
        /// The field value, expressed as a String.
        public let stringValue: String?

        public init(key: String, refValue: String? = nil, stringValue: String? = nil) {
            self.key = key
            self.refValue = refValue
            self.stringValue = stringValue
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 256)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.validate(self.refValue, name: "refValue", parent: name, max: 256)
            try self.validate(self.refValue, name: "refValue", parent: name, min: 1)
            try self.validate(self.refValue, name: "refValue", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.validate(self.stringValue, name: "stringValue", parent: name, max: 10240)
            try self.validate(self.stringValue, name: "stringValue", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case key
            case refValue
            case stringValue
        }
    }

    public struct GetPipelineDefinitionInput: AWSEncodableShape {
        /// The ID of the pipeline.
        public let pipelineId: String
        /// The version of the pipeline definition to retrieve. Set this parameter to latest (default)  to use the last definition saved to the pipeline or active to use the last definition   that was activated.
        public let version: String?

        public init(pipelineId: String, version: String? = nil) {
            self.pipelineId = pipelineId
            self.version = version
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, max: 1024)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, min: 1)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.validate(self.version, name: "version", parent: name, max: 1024)
            try self.validate(self.version, name: "version", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineId
            case version
        }
    }

    public struct GetPipelineDefinitionOutput: AWSDecodableShape {
        /// The parameter objects used in the pipeline definition.
        public let parameterObjects: [ParameterObject]?
        /// The parameter values used in the pipeline definition.
        public let parameterValues: [ParameterValue]?
        /// The objects defined in the pipeline.
        public let pipelineObjects: [PipelineObject]?

        public init(parameterObjects: [ParameterObject]? = nil, parameterValues: [ParameterValue]? = nil, pipelineObjects: [PipelineObject]? = nil) {
            self.parameterObjects = parameterObjects
            self.parameterValues = parameterValues
            self.pipelineObjects = pipelineObjects
        }

        private enum CodingKeys: String, CodingKey {
            case parameterObjects
            case parameterValues
            case pipelineObjects
        }
    }

    public struct InstanceIdentity: AWSEncodableShape {
        /// A description of an EC2 instance that is generated when the instance is launched and exposed to the instance via the instance metadata service in the form of a JSON representation of an object.
        public let document: String?
        /// A signature which can be used to verify the accuracy and authenticity of the information provided in the instance identity document.
        public let signature: String?

        public init(document: String? = nil, signature: String? = nil) {
            self.document = document
            self.signature = signature
        }

        public func validate(name: String) throws {
            try self.validate(self.document, name: "document", parent: name, max: 1024)
            try self.validate(self.document, name: "document", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.validate(self.signature, name: "signature", parent: name, max: 1024)
            try self.validate(self.signature, name: "signature", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case document
            case signature
        }
    }

    public struct ListPipelinesInput: AWSEncodableShape {
        /// The starting point for the results to be returned. For the first call, this value should be empty.  As long as there are more results, continue to call ListPipelines with the marker value from the previous call to retrieve the next set of results.
        public let marker: String?

        public init(marker: String? = nil) {
            self.marker = marker
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case marker
        }
    }

    public struct ListPipelinesOutput: AWSDecodableShape {
        /// Indicates whether there are more results that can be obtained by a subsequent call.
        public let hasMoreResults: Bool?
        /// The starting point for the next page of results. To view the next page of results, call ListPipelinesOutput  again with this marker value. If the value is null, there are no more results.
        public let marker: String?
        /// The pipeline identifiers. If you require additional information about the pipelines, you can use these identifiers to call  DescribePipelines and GetPipelineDefinition.
        public let pipelineIdList: [PipelineIdName]

        public init(hasMoreResults: Bool? = nil, marker: String? = nil, pipelineIdList: [PipelineIdName]) {
            self.hasMoreResults = hasMoreResults
            self.marker = marker
            self.pipelineIdList = pipelineIdList
        }

        private enum CodingKeys: String, CodingKey {
            case hasMoreResults
            case marker
            case pipelineIdList
        }
    }

    public struct Operator: AWSEncodableShape {
        ///  The logical operation to be performed: equal (EQ), equal reference (REF_EQ), less than or equal (LE), greater than or equal (GE), or between (BETWEEN). Equal reference (REF_EQ) can be used only with reference fields. The other comparison types can be used only with String fields. The comparison types you can use apply only to certain object fields, as detailed below.     The comparison operators EQ and REF_EQ act on the following fields:   name @sphere parent @componentParent @instanceParent @status @scheduledStartTime @scheduledEndTime @actualStartTime @actualEndTime    The comparison operators GE, LE, and BETWEEN act on the following fields:   @scheduledStartTime @scheduledEndTime @actualStartTime @actualEndTime  Note that fields beginning with the at sign (@) are read-only and set by the web service. When you name fields, you should choose names containing only alpha-numeric values, as symbols may be reserved by AWS Data Pipeline. User-defined fields that you add to a pipeline should prefix their name with the string "my".
        public let type: OperatorType?
        /// The value that the actual field value will be compared with.
        public let values: [String]?

        public init(type: OperatorType? = nil, values: [String]? = nil) {
            self.type = type
            self.values = values
        }

        public func validate(name: String) throws {
            try self.values?.forEach {
                try validate($0, name: "values[]", parent: name, max: 1024)
                try validate($0, name: "values[]", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case type
            case values
        }
    }

    public struct ParameterAttribute: AWSEncodableShape & AWSDecodableShape {
        /// The field identifier.
        public let key: String
        /// The field value, expressed as a String.
        public let stringValue: String

        public init(key: String, stringValue: String) {
            self.key = key
            self.stringValue = stringValue
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 256)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.validate(self.stringValue, name: "stringValue", parent: name, max: 10240)
            try self.validate(self.stringValue, name: "stringValue", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case key
            case stringValue
        }
    }

    public struct ParameterObject: AWSEncodableShape & AWSDecodableShape {
        /// The attributes of the parameter object.
        public let attributes: [ParameterAttribute]
        /// The ID of the parameter object.
        public let id: String

        public init(attributes: [ParameterAttribute], id: String) {
            self.attributes = attributes
            self.id = id
        }

        public func validate(name: String) throws {
            try self.attributes.forEach {
                try $0.validate(name: "\(name).attributes[]")
            }
            try self.validate(self.id, name: "id", parent: name, max: 256)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case attributes
            case id
        }
    }

    public struct ParameterValue: AWSEncodableShape & AWSDecodableShape {
        /// The ID of the parameter value.
        public let id: String
        /// The field value, expressed as a String.
        public let stringValue: String

        public init(id: String, stringValue: String) {
            self.id = id
            self.stringValue = stringValue
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 256)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.validate(self.stringValue, name: "stringValue", parent: name, max: 10240)
            try self.validate(self.stringValue, name: "stringValue", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case stringValue
        }
    }

    public struct PipelineDescription: AWSDecodableShape {
        /// Description of the pipeline.
        public let description: String?
        /// A list of read-only fields that contain metadata about the pipeline: @userId, @accountId, and @pipelineState.
        public let fields: [Field]
        /// The name of the pipeline.
        public let name: String
        /// The pipeline identifier that was assigned by AWS Data Pipeline. This is a string of the form df-297EG78HU43EEXAMPLE.
        public let pipelineId: String
        /// A list of tags to associated with a pipeline. Tags let you control access to pipelines.  For more information, see Controlling User Access to Pipelines in the AWS Data Pipeline Developer Guide.
        public let tags: [Tag]?

        public init(description: String? = nil, fields: [Field], name: String, pipelineId: String, tags: [Tag]? = nil) {
            self.description = description
            self.fields = fields
            self.name = name
            self.pipelineId = pipelineId
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case fields
            case name
            case pipelineId
            case tags
        }
    }

    public struct PipelineIdName: AWSDecodableShape {
        /// The ID of the pipeline that was assigned by AWS Data Pipeline. This is a string of the form df-297EG78HU43EEXAMPLE.
        public let id: String?
        /// The name of the pipeline.
        public let name: String?

        public init(id: String? = nil, name: String? = nil) {
            self.id = id
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case name
        }
    }

    public struct PipelineObject: AWSEncodableShape & AWSDecodableShape {
        /// Key-value pairs that define the properties of the object.
        public let fields: [Field]
        /// The ID of the object.
        public let id: String
        /// The name of the object.
        public let name: String

        public init(fields: [Field], id: String, name: String) {
            self.fields = fields
            self.id = id
            self.name = name
        }

        public func validate(name: String) throws {
            try self.fields.forEach {
                try $0.validate(name: "\(name).fields[]")
            }
            try self.validate(self.id, name: "id", parent: name, max: 1024)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.validate(self.name, name: "name", parent: name, max: 1024)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case fields
            case id
            case name
        }
    }

    public struct PollForTaskInput: AWSEncodableShape {
        /// The public DNS name of the calling task runner.
        public let hostname: String?
        /// Identity information for the EC2 instance that is hosting the task runner. You can get this value from the instance using http://169.254.169.254/latest/meta-data/instance-id. For more information, see Instance Metadata in the Amazon Elastic Compute Cloud User Guide. Passing in this value proves that your task runner is running on an EC2 instance, and ensures the proper AWS Data Pipeline service charges are applied to your pipeline.
        public let instanceIdentity: InstanceIdentity?
        /// The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created.  You can only specify a single value for workerGroup in the call to PollForTask. There are no wildcard values permitted in  workerGroup; the string must be an exact, case-sensitive, match.
        public let workerGroup: String

        public init(hostname: String? = nil, instanceIdentity: InstanceIdentity? = nil, workerGroup: String) {
            self.hostname = hostname
            self.instanceIdentity = instanceIdentity
            self.workerGroup = workerGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.hostname, name: "hostname", parent: name, max: 1024)
            try self.validate(self.hostname, name: "hostname", parent: name, min: 1)
            try self.validate(self.hostname, name: "hostname", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.instanceIdentity?.validate(name: "\(name).instanceIdentity")
            try self.validate(self.workerGroup, name: "workerGroup", parent: name, max: 1024)
            try self.validate(self.workerGroup, name: "workerGroup", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case hostname
            case instanceIdentity
            case workerGroup
        }
    }

    public struct PollForTaskOutput: AWSDecodableShape {
        /// The information needed to complete the task that is being assigned to the task runner. One of the fields returned in this object is taskId,  which contains an identifier for the task being assigned. The calling task runner uses taskId in subsequent calls to ReportTaskProgress  and SetTaskStatus.
        public let taskObject: TaskObject?

        public init(taskObject: TaskObject? = nil) {
            self.taskObject = taskObject
        }

        private enum CodingKeys: String, CodingKey {
            case taskObject
        }
    }

    public struct PutPipelineDefinitionInput: AWSEncodableShape {
        /// The parameter objects used with the pipeline.
        public let parameterObjects: [ParameterObject]?
        /// The parameter values used with the pipeline.
        public let parameterValues: [ParameterValue]?
        /// The ID of the pipeline.
        public let pipelineId: String
        /// The objects that define the pipeline. These objects overwrite the existing pipeline definition.
        public let pipelineObjects: [PipelineObject]

        public init(parameterObjects: [ParameterObject]? = nil, parameterValues: [ParameterValue]? = nil, pipelineId: String, pipelineObjects: [PipelineObject]) {
            self.parameterObjects = parameterObjects
            self.parameterValues = parameterValues
            self.pipelineId = pipelineId
            self.pipelineObjects = pipelineObjects
        }

        public func validate(name: String) throws {
            try self.parameterObjects?.forEach {
                try $0.validate(name: "\(name).parameterObjects[]")
            }
            try self.parameterValues?.forEach {
                try $0.validate(name: "\(name).parameterValues[]")
            }
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, max: 1024)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, min: 1)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.pipelineObjects.forEach {
                try $0.validate(name: "\(name).pipelineObjects[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case parameterObjects
            case parameterValues
            case pipelineId
            case pipelineObjects
        }
    }

    public struct PutPipelineDefinitionOutput: AWSDecodableShape {
        /// Indicates whether there were validation errors, and the pipeline definition is stored but cannot be  activated until you correct the pipeline and call PutPipelineDefinition to commit the corrected pipeline.
        public let errored: Bool
        /// The validation errors that are associated with the objects defined in pipelineObjects.
        public let validationErrors: [ValidationError]?
        /// The validation warnings that are associated with the objects defined in pipelineObjects.
        public let validationWarnings: [ValidationWarning]?

        public init(errored: Bool, validationErrors: [ValidationError]? = nil, validationWarnings: [ValidationWarning]? = nil) {
            self.errored = errored
            self.validationErrors = validationErrors
            self.validationWarnings = validationWarnings
        }

        private enum CodingKeys: String, CodingKey {
            case errored
            case validationErrors
            case validationWarnings
        }
    }

    public struct Query: AWSEncodableShape {
        /// List of selectors that define the query. An object must satisfy all of the selectors to match the query.
        public let selectors: [Selector]?

        public init(selectors: [Selector]? = nil) {
            self.selectors = selectors
        }

        public func validate(name: String) throws {
            try self.selectors?.forEach {
                try $0.validate(name: "\(name).selectors[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case selectors
        }
    }

    public struct QueryObjectsInput: AWSEncodableShape {
        /// The maximum number of object names that QueryObjects will return in a single call. The default value is 100.
        public let limit: Int?
        /// The starting point for the results to be returned. For the first call, this value should be empty.  As long as there are more results, continue to call QueryObjects with the marker value from the previous call to retrieve the next set of results.
        public let marker: String?
        /// The ID of the pipeline.
        public let pipelineId: String
        /// The query that defines the objects to be returned. The Query object can contain a maximum of ten selectors.  The conditions in the query are limited to top-level String fields in the object.  These filters can be applied to components, instances, and attempts.
        public let query: Query?
        /// Indicates whether the query applies to components or instances. The possible values are:	 COMPONENT, INSTANCE, and ATTEMPT.
        public let sphere: String

        public init(limit: Int? = nil, marker: String? = nil, pipelineId: String, query: Query? = nil, sphere: String) {
            self.limit = limit
            self.marker = marker
            self.pipelineId = pipelineId
            self.query = query
            self.sphere = sphere
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, max: 1024)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, min: 1)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.query?.validate(name: "\(name).query")
            try self.validate(self.sphere, name: "sphere", parent: name, max: 1024)
            try self.validate(self.sphere, name: "sphere", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case limit
            case marker
            case pipelineId
            case query
            case sphere
        }
    }

    public struct QueryObjectsOutput: AWSDecodableShape {
        /// Indicates whether there are more results that can be obtained by a subsequent call.
        public let hasMoreResults: Bool?
        /// The identifiers that match the query selectors.
        public let ids: [String]?
        /// The starting point for the next page of results. To view the next page of results, call QueryObjects  again with this marker value. If the value is null, there are no more results.
        public let marker: String?

        public init(hasMoreResults: Bool? = nil, ids: [String]? = nil, marker: String? = nil) {
            self.hasMoreResults = hasMoreResults
            self.ids = ids
            self.marker = marker
        }

        private enum CodingKeys: String, CodingKey {
            case hasMoreResults
            case ids
            case marker
        }
    }

    public struct RemoveTagsInput: AWSEncodableShape {
        /// The ID of the pipeline.
        public let pipelineId: String
        /// The keys of the tags to remove.
        public let tagKeys: [String]

        public init(pipelineId: String, tagKeys: [String]) {
            self.pipelineId = pipelineId
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, max: 1024)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, min: 1)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 1024)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineId
            case tagKeys
        }
    }

    public struct RemoveTagsOutput: AWSDecodableShape {
        public init() {}
    }

    public struct ReportTaskProgressInput: AWSEncodableShape {
        /// Key-value pairs that define the properties of the ReportTaskProgressInput object.
        public let fields: [Field]?
        /// The ID of the task assigned to the task runner. This value is provided in the response for PollForTask.
        public let taskId: String

        public init(fields: [Field]? = nil, taskId: String) {
            self.fields = fields
            self.taskId = taskId
        }

        public func validate(name: String) throws {
            try self.fields?.forEach {
                try $0.validate(name: "\(name).fields[]")
            }
            try self.validate(self.taskId, name: "taskId", parent: name, max: 2048)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case fields
            case taskId
        }
    }

    public struct ReportTaskProgressOutput: AWSDecodableShape {
        /// If true, the calling task runner should cancel processing of the task. The task runner does not need to call SetTaskStatus for canceled tasks.
        public let canceled: Bool

        public init(canceled: Bool) {
            self.canceled = canceled
        }

        private enum CodingKeys: String, CodingKey {
            case canceled
        }
    }

    public struct ReportTaskRunnerHeartbeatInput: AWSEncodableShape {
        /// The public DNS name of the task runner.
        public let hostname: String?
        /// The ID of the task runner. This value should be unique across your AWS account. In the case of AWS Data Pipeline Task Runner  launched on a resource managed by AWS Data Pipeline, the web service provides a unique identifier when it launches the application.  If you have written a custom task runner, you should assign a unique identifier for the task runner.
        public let taskrunnerId: String
        /// The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created.  You can only specify a single value for workerGroup. There are no wildcard values permitted in workerGroup; the string  must be an exact, case-sensitive, match.
        public let workerGroup: String?

        public init(hostname: String? = nil, taskrunnerId: String, workerGroup: String? = nil) {
            self.hostname = hostname
            self.taskrunnerId = taskrunnerId
            self.workerGroup = workerGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.hostname, name: "hostname", parent: name, max: 1024)
            try self.validate(self.hostname, name: "hostname", parent: name, min: 1)
            try self.validate(self.hostname, name: "hostname", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.validate(self.taskrunnerId, name: "taskrunnerId", parent: name, max: 1024)
            try self.validate(self.taskrunnerId, name: "taskrunnerId", parent: name, min: 1)
            try self.validate(self.taskrunnerId, name: "taskrunnerId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.validate(self.workerGroup, name: "workerGroup", parent: name, max: 1024)
            try self.validate(self.workerGroup, name: "workerGroup", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case hostname
            case taskrunnerId
            case workerGroup
        }
    }

    public struct ReportTaskRunnerHeartbeatOutput: AWSDecodableShape {
        /// Indicates whether the calling task runner should terminate.
        public let terminate: Bool

        public init(terminate: Bool) {
            self.terminate = terminate
        }

        private enum CodingKeys: String, CodingKey {
            case terminate
        }
    }

    public struct Selector: AWSEncodableShape {
        /// The name of the field that the operator will be applied to. The field name is the "key" portion of the field definition in the pipeline definition syntax that is used by the AWS Data Pipeline API. If the field is not set on the object, the condition fails.
        public let fieldName: String?
        public let `operator`: Operator?

        public init(fieldName: String? = nil, operator: Operator? = nil) {
            self.fieldName = fieldName
            self.`operator` = `operator`
        }

        public func validate(name: String) throws {
            try self.validate(self.fieldName, name: "fieldName", parent: name, max: 1024)
            try self.validate(self.fieldName, name: "fieldName", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.`operator`?.validate(name: "\(name).`operator`")
        }

        private enum CodingKeys: String, CodingKey {
            case fieldName
            case `operator`
        }
    }

    public struct SetStatusInput: AWSEncodableShape {
        /// The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.
        public let objectIds: [String]
        /// The ID of the pipeline that contains the objects.
        public let pipelineId: String
        /// The status to be set on all the objects specified in objectIds. For components, use PAUSE or RESUME.  For instances, use TRY_CANCEL, RERUN, or MARK_FINISHED.
        public let status: String

        public init(objectIds: [String], pipelineId: String, status: String) {
            self.objectIds = objectIds
            self.pipelineId = pipelineId
            self.status = status
        }

        public func validate(name: String) throws {
            try self.objectIds.forEach {
                try validate($0, name: "objectIds[]", parent: name, max: 1024)
                try validate($0, name: "objectIds[]", parent: name, min: 1)
                try validate($0, name: "objectIds[]", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            }
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, max: 1024)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, min: 1)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.validate(self.status, name: "status", parent: name, max: 1024)
            try self.validate(self.status, name: "status", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case objectIds
            case pipelineId
            case status
        }
    }

    public struct SetTaskStatusInput: AWSEncodableShape {
        /// If an error occurred during the task, this value specifies the error code. This value is set on the physical attempt object.  It is used to display error information to the user. It should not start with string "Service_" which is reserved by the system.
        public let errorId: String?
        /// If an error occurred during the task, this value specifies a text description of the error. This value is set on the physical attempt object.  It is used to display error information to the user. The web service does not parse this value.
        public let errorMessage: String?
        /// If an error occurred during the task, this value specifies the stack trace associated with the error. This value is set on the physical attempt object.  It is used to display error information to the user. The web service does not parse this value.
        public let errorStackTrace: String?
        /// The ID of the task assigned to the task runner. This value is provided in the response for PollForTask.
        public let taskId: String
        /// If FINISHED, the task successfully completed. If FAILED, the task ended unsuccessfully. Preconditions use false.
        public let taskStatus: TaskStatus

        public init(errorId: String? = nil, errorMessage: String? = nil, errorStackTrace: String? = nil, taskId: String, taskStatus: TaskStatus) {
            self.errorId = errorId
            self.errorMessage = errorMessage
            self.errorStackTrace = errorStackTrace
            self.taskId = taskId
            self.taskStatus = taskStatus
        }

        public func validate(name: String) throws {
            try self.validate(self.errorId, name: "errorId", parent: name, max: 1024)
            try self.validate(self.errorId, name: "errorId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.validate(self.errorStackTrace, name: "errorStackTrace", parent: name, max: 1024)
            try self.validate(self.errorStackTrace, name: "errorStackTrace", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.validate(self.taskId, name: "taskId", parent: name, max: 2048)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
        }

        private enum CodingKeys: String, CodingKey {
            case errorId
            case errorMessage
            case errorStackTrace
            case taskId
            case taskStatus
        }
    }

    public struct SetTaskStatusOutput: AWSDecodableShape {
        public init() {}
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The key name of a tag defined by a user.   For more information, see Controlling User Access to Pipelines in the AWS Data Pipeline Developer Guide.
        public let key: String
        /// The optional value portion of a tag defined by a user.     For more information, see Controlling User Access to Pipelines in the AWS Data Pipeline Developer Guide.
        public let value: String

        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
        }

        private enum CodingKeys: String, CodingKey {
            case key
            case value
        }
    }

    public struct TaskObject: AWSDecodableShape {
        /// The ID of the pipeline task attempt object. AWS Data Pipeline uses this value to track how many times a task is attempted.
        public let attemptId: String?
        /// Connection information for the location where the task runner will publish the output of the task.
        public let objects: [String: PipelineObject]?
        /// The ID of the pipeline that provided the task.
        public let pipelineId: String?
        /// An internal identifier for the task. This ID is passed to the SetTaskStatus and ReportTaskProgress actions.
        public let taskId: String?

        public init(attemptId: String? = nil, objects: [String: PipelineObject]? = nil, pipelineId: String? = nil, taskId: String? = nil) {
            self.attemptId = attemptId
            self.objects = objects
            self.pipelineId = pipelineId
            self.taskId = taskId
        }

        private enum CodingKeys: String, CodingKey {
            case attemptId
            case objects
            case pipelineId
            case taskId
        }
    }

    public struct ValidatePipelineDefinitionInput: AWSEncodableShape {
        /// The parameter objects used with the pipeline.
        public let parameterObjects: [ParameterObject]?
        /// The parameter values used with the pipeline.
        public let parameterValues: [ParameterValue]?
        /// The ID of the pipeline.
        public let pipelineId: String
        /// The objects that define the pipeline changes to validate against the pipeline.
        public let pipelineObjects: [PipelineObject]

        public init(parameterObjects: [ParameterObject]? = nil, parameterValues: [ParameterValue]? = nil, pipelineId: String, pipelineObjects: [PipelineObject]) {
            self.parameterObjects = parameterObjects
            self.parameterValues = parameterValues
            self.pipelineId = pipelineId
            self.pipelineObjects = pipelineObjects
        }

        public func validate(name: String) throws {
            try self.parameterObjects?.forEach {
                try $0.validate(name: "\(name).parameterObjects[]")
            }
            try self.parameterValues?.forEach {
                try $0.validate(name: "\(name).parameterValues[]")
            }
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, max: 1024)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, min: 1)
            try self.validate(self.pipelineId, name: "pipelineId", parent: name, pattern: "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*")
            try self.pipelineObjects.forEach {
                try $0.validate(name: "\(name).pipelineObjects[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case parameterObjects
            case parameterValues
            case pipelineId
            case pipelineObjects
        }
    }

    public struct ValidatePipelineDefinitionOutput: AWSDecodableShape {
        /// Indicates whether there were validation errors.
        public let errored: Bool
        /// Any validation errors that were found.
        public let validationErrors: [ValidationError]?
        /// Any validation warnings that were found.
        public let validationWarnings: [ValidationWarning]?

        public init(errored: Bool, validationErrors: [ValidationError]? = nil, validationWarnings: [ValidationWarning]? = nil) {
            self.errored = errored
            self.validationErrors = validationErrors
            self.validationWarnings = validationWarnings
        }

        private enum CodingKeys: String, CodingKey {
            case errored
            case validationErrors
            case validationWarnings
        }
    }

    public struct ValidationError: AWSDecodableShape {
        /// A description of the validation error.
        public let errors: [String]?
        /// The identifier of the object that contains the validation error.
        public let id: String?

        public init(errors: [String]? = nil, id: String? = nil) {
            self.errors = errors
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case errors
            case id
        }
    }

    public struct ValidationWarning: AWSDecodableShape {
        /// The identifier of the object that contains the validation warning.
        public let id: String?
        /// A description of the validation warning.
        public let warnings: [String]?

        public init(id: String? = nil, warnings: [String]? = nil) {
            self.id = id
            self.warnings = warnings
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case warnings
        }
    }
}

// MARK: - Errors

/// Error enum for DataPipeline
public struct DataPipelineErrorType: AWSErrorType {
    enum Code: String {
        case internalServiceError = "InternalServiceError"
        case invalidRequestException = "InvalidRequestException"
        case pipelineDeletedException = "PipelineDeletedException"
        case pipelineNotFoundException = "PipelineNotFoundException"
        case taskNotFoundException = "TaskNotFoundException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize DataPipeline
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// An internal service error occurred.
    public static var internalServiceError: Self { .init(.internalServiceError) }
    /// The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven&#39;t exceeded any of the service limits for your account.
    public static var invalidRequestException: Self { .init(.invalidRequestException) }
    /// The specified pipeline has been deleted.
    public static var pipelineDeletedException: Self { .init(.pipelineDeletedException) }
    /// The specified pipeline was not found. Verify that you used the correct user and account identifiers.
    public static var pipelineNotFoundException: Self { .init(.pipelineNotFoundException) }
    /// The specified task was not found.
    public static var taskNotFoundException: Self { .init(.taskNotFoundException) }
}

extension DataPipelineErrorType: Equatable {
    public static func == (lhs: DataPipelineErrorType, rhs: DataPipelineErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension DataPipelineErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
